/*
 * @Description:
 * @Date: 2021-09-16 15:34:46
 * @LastEditTime: 2021-09-16 16:30:31
 */
import type { Router } from 'vue-router'
import { PageEnum } from '../../enums/pageEnum'
const HOME_PATH: PageEnum = PageEnum.BASE_HOME
export function createPermissionGuard(router: Router) {
  router.beforeEach((to, from, next) => {
    if (to.matched.length === 0) {
      next(PageEnum.BASE_HOME)
    } else next()
  })
}
